// #channel
// ##6292 CB_TRTT_TRANSFER
// #key
// ##6292-616b10c58a8ba817de1e0da003bd60c7
// #URL
// ##https://pushbear.ftqq.com/sub

const rpn = require('request-promise-native')
var url = "https://pushbear.ftqq.com/sub"
const enable = true

async function SendMessage(title, desc) {
    if(!enable)return

    var postData = {}
    postData.sendkey = "6292-616b10c58a8ba817de1e0da003bd60c7"
    postData.text = title
    postData.desp = desc

    let options = {
        method: 'GET',
        uri: url,
        qs: postData,
        json: true
      };

    var body = await rpn.post(options)
    return body
}

module.exports = SendMessage